#ifndef __PROTOTYPE_H__
#define __PROTOTYPE_H__
#include <iostream>
#include <string>

class ProtoType{
public:
    virtual ~ProtoType()=default;
    virtual ProtoType* clone() = 0;
    virtual void setName(const std::string& name)=0;
    virtual void setAge(const int& age)=0;
    virtual void setWorkExperies(const std::string& experies)=0;
    virtual void setLastCompany(const std::string& company)=0;
    virtual  void showInformation()=0;
};

class Resume:public ProtoType{
protected:
    std::string m_name;
    int m_age;
    std::string m_workExperies;
    std::string m_lastCompany;
public:
    Resume()=default;
    Resume(const Resume& resume){
        this->m_name = resume.m_name;
        this->m_age = resume.m_age;
        this->m_workExperies = resume.m_workExperies;
        this->m_lastCompany  = resume.m_lastCompany;
    }
    void showInformation(){
        std::cout << "姓名："<<m_name
        <<"\n年龄: "<<m_age
        <<"\n工作经历: "<<m_workExperies
        <<"\n上家公司: " << m_lastCompany << std::endl;
    }
    virtual void setName(const std::string& name);
    virtual void setAge(const int& age);
    virtual void setWorkExperies(const std::string& experies);
    virtual void setLastCompany(const std::string& company);
    virtual ProtoType* clone();
};


#endif